<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <!-- 数据类型为两大类：
        ● 基本数据类型（primitive data type），也叫原始数据类型。
        ● 引用数据类型 (object data type)。 -->

    <!-- 基本数据类型:
                ●  number: 表示值为数值 
                ●  string: 表示值为字符串 
                ●  boolean: 表示值为布尔值 
                ●  null: 表示值为空 
                ●  undefined: 表示未定义 -->

    <!--  // 判断变量的值是否是undefined这个特殊的值
        // console.log( username === undefined ) // true -->
</head>

<body>

    <script>
        // underfind 未定义类型 let age; let age = underfined(不给赋值，默认打印未定义);

        let age = 20;
        let nanme = 'ZZC';
        let username = '18864zzc';
        let password = 123456;
        let isLoading = true;
        let hobby = ['run', 'play basketball', 'sheep', 'eat food', 'listen music']
        console.log(typeof age);
        console.log(age);
        console.log(typeof name);
        console.log(nanme);
        console.log(typeof username);
        console.log(username);
        console.log(typeof password);
        console.log(password);
        console.log(isLoading);
        console.log(typeof isLoading);
        console.log(typeof hobby);
        console.log(hobby);


        let num = '13.14ac4'
        console.log(parseFloat(num));


        let price1 = '189.99￥';
        let price2 = '300￥';
        let toPrice = parseFloat(price1) + parseFloat(price2);
        toPrice = toPrice + '￥';
        console.log(toPrice);

    </script>
</body>

</html>